from django.contrib import admin
from models import Reporter,Article,DevModules

class ReporterAdmin(admin.ModelAdmin):
    list_display=("full_name",)

class DevModulesAdmin(admin.ModelAdmin):
    list_display = ("project_name","project_version","project_url","module_name","module_type","module_path","size","modify_time","md5","zip","notify",)
    fieldsets = [
        (None,{'fields':['project_name','project_version',]}),
        ('Base Information',{'fields':['project_url','module_name','module_type','module_path',]}),
        ('File Size',{'fields':['size','modify_time','md5',]}),
        (None,{'fields':['zip','notify',]}),
    ]

class ArticleAdmin(admin.ModelAdmin):
    list_display =("pub_Date","headline","content","reporter",)
    fieldsets = [
        (None,{'fields':['pub_Date']}),
        ('Date information',{'fields':['headline','content']}),
        ('Author',{'fields':['reporter']}),
    ]

admin.site.register(Reporter,ReporterAdmin)
admin.site.register(Article,ArticleAdmin)
admin.site.register(DevModules,DevModulesAdmin)
